package com.skhu.as.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.skhu.as.domain.PresentCondition;
import com.skhu.as.domain.PresentConditionDomain;

public class PresentConditionDomainM implements RowMapper {

	@Override
	public Object mapRow(ResultSet rs, int rowNum) throws SQLException {

		PresentConditionDomain presentConditionDomain = new PresentConditionDomain();
		
		presentConditionDomain.setPresentConditionNo(rs.getInt("present_condition_no"));
		presentConditionDomain.setFaultHandlingNo(rs.getInt("fault_handling_no"));
		presentConditionDomain.setWorkerName(rs.getString("name"));
		presentConditionDomain.setWorkerContactNumber(rs.getString("contact_number"));
		presentConditionDomain.setDate(rs.getString("date"));
		presentConditionDomain.setContent(rs.getString("content"));
		
		return presentConditionDomain;
	}
	
}
